home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / Global.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  5KB  |  245 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // Global.h
  5. //
  6. // API for the package Global.
  7. //
  8. // Revision control information:
  9. //
  10. // $Header: /flux/packages/Global.h 3     21/04/01 11:52 Derekm $
  11. //
  12.  
  13. #include "Flux.h"
  14.  
  15. #ifdef FLUX_COMPILE
  16.  
  17. FLUX_DECLARE_EXTENSION(Global);
  18.  
  19. #ifdef FLUX_LIB
  20. #if _MSC_VER >= 1000
  21. #pragma comment( lib, "global" )
  22. #endif // _MSC_VER >= 1000
  23. #endif // FLUX_LIB
  24.  
  25. #else
  26.  
  27. // Include other packages
  28. uses String, List, Set;
  29.  
  30. // Enumeration for access to global
  31. enum eGlobalAccess 
  32.     GA_Read           = 1, 
  33.     GA_Write          = 2,
  34.     GA_Indestructible = 4,
  35.     GA_NoSave         = 8
  36. };
  37.  
  38. // Enumeration for the type of the global value
  39. enum eGlobalType
  40.     GT_Int, 
  41.     GT_Float, 
  42.     GT_Bool, 
  43.     GT_Handle,
  44.     GT_String, 
  45.     GT_List, 
  46.     GT_Set
  47. };
  48.  
  49. //
  50. // Creation functions
  51. //
  52.  
  53. //
  54. // Global.CreateInt( string name, int access, int initial_value )
  55. //
  56. // Create a global integer 
  57. //
  58. prototype Global.CreateInt( string name, int access, int initial_value );
  59.  
  60. //
  61. //  Global.CreateFloat( string name, int access, float initial_value )
  62. //
  63. // Create a global floating-point 
  64. //
  65. prototype Global.CreateFloat( string name, int access, float initial_value );
  66.  
  67. //
  68. // Global.CreateBool( string name, int access, bool initial_value )
  69. //
  70. // Create a global boolean 
  71. //
  72. prototype Global.CreateBool( string name, int access, bool initial_value );
  73.  
  74. //
  75. // Global.CreateHandle( string name, int access, hobject initial_value )
  76. //
  77. // Create a global handle 
  78. //
  79. prototype Global.CreateHandle( 
  80.     string name, int access, hobject initial_value );
  81.  
  82. //
  83. // Global.CreateString( string name, int access, string initial_value )
  84. //
  85. // Create a global string 
  86. //
  87. prototype Global.CreateString( string name, int access, string initial_value );
  88.  
  89. //
  90. // Global.CreateList( string name, int access, list initial_value )
  91. //
  92. // Create a global list 
  93. //
  94. prototype Global.CreateList( string name, int access, list initial_value );
  95.  
  96. //
  97. // Global.CreateSet( string name, int access, set initial_value )
  98. //
  99. // Create a global set 
  100. //
  101. prototype Global.CreateSet( string name, int access, set initial_value );
  102.  
  103. //
  104. // prototype Global.Destroy( string name )
  105. //
  106. // Destroy function
  107. //
  108. prototype Global.Destroy( string name );
  109.  
  110. //
  111. // Queries
  112. //
  113.  
  114. //
  115. // prototype bool Global.Exists( string name )
  116. //
  117. // Query global for existance
  118. //
  119. prototype bool Global.Exists( string name );
  120.  
  121. //
  122. // prototype eGlobalType Global.Type( string name )
  123. //
  124. // Query global for type
  125. //
  126. prototype eGlobalType Global.Type( string name );
  127.  
  128. //
  129. // Accessors
  130. //
  131.  
  132. //
  133. // int Global.Int( string name )
  134. //
  135. // Integer global accessor
  136. //
  137. prototype int Global.Int( string name );
  138.  
  139. //
  140. // float Global.Float( string name )
  141. //
  142. // Floating-point global accessor
  143. //
  144. prototype float Global.Float( string name );
  145.  
  146. //
  147. // bool Global.Bool( string name )
  148. //
  149. // Boolean global accessor
  150. //
  151. prototype bool Global.Bool( string name );
  152.  
  153. //
  154. // hobject Global.Handle( string name )
  155. //
  156. // Handle global accessor
  157. //
  158. prototype hobject Global.Handle( string name );
  159.  
  160. //
  161. // string Global.String( string name )
  162. //
  163. // String global accessor
  164. //
  165. prototype string Global.String( string name );
  166.  
  167. //
  168. // list Global.List( string name )
  169. //
  170. // List global accessor
  171. //
  172. prototype list Global.List( string name );
  173.  
  174. //
  175. // set Global.Set( string name )
  176. //
  177. // Set global accessor
  178. //
  179. prototype set Global.Set( string name );
  180.  
  181. //
  182. // Settors
  183. //
  184.  
  185. //
  186. // Global.SetInt( string name, int value )
  187. //
  188. // Set the global integer
  189. //
  190. prototype Global.SetInt( string name, int value );
  191.  
  192. //
  193. // Global.SetFloat( string name, float value )
  194. //
  195. // Set the global float
  196. //
  197. prototype Global.SetFloat( string name, float value );
  198.  
  199. //
  200. // Global.SetBool( string name, bool value )
  201. //
  202. // Set the global bool
  203. //
  204. prototype Global.SetBool( string name, bool value );
  205.  
  206. //
  207. // Global.SetHandle( string name, hobject value )
  208. //
  209. // Set the global handle
  210. //
  211. prototype Global.SetHandle( string name, hobject value );
  212.  
  213. //
  214. // Global.SetString( string name, string value )
  215. //
  216. // Set the global string
  217. //
  218. prototype Global.SetString( string name, string value );
  219.  
  220. //
  221. // Global.SetList( string name, list value )
  222. //
  223. // Set the global list
  224. //
  225. prototype Global.SetList( string name, list value );
  226.  
  227. //
  228. // Global.SetSet( string name, set value )
  229. //
  230. // Set the global set
  231. //
  232. prototype Global.SetSet( string name, set value );
  233.  
  234. //
  235. // Global.SetAccess(string name, int access)
  236. //
  237. // Set the access rights for the global
  238. //
  239. prototype Global.SetAccess(string name, int access);
  240.  
  241.  
  242. #endif // FLUX_LIB
  243.